import 'package:flutter/material.dart';

extension RectInsets on Rect {
  Rect withInsets(EdgeInsets insets) {
    return Rect.fromLTWH(
      left + insets.left,
      top + insets.top,
      width - insets.left - insets.right,
      height - insets.top - insets.bottom,
    );
  }
}